//
//  TableOperation.h
//  Runone
//
//  Created by runone01 on 16/8/18.
//  Copyright © 2016年 runone. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <objc/runtime.h>
typedef NS_ENUM(NSInteger,TableName) {
    PirNoTable,
    StationTable
};
@interface TableOperation : NSObject
//People单例
+ (instancetype)shareInstance;

#pragma mark ---------------------------创建表---------------------------

////创建高速干道信息表
//- (void)createHighWayRoadTable;

// 创建新的高速干道信息表
- (void) creatNewAllHighWayRoadTable;

//创建收费站信息表信息表
- (void)createStationTable;

//创建设备表信息表
- (void)createAllDeviceTable;

//创建更新时间表
-(void)createUpdateTimeTable;

//创建桩号信息表
-(void)createPirNoTable;

//两客一危信息表
-(void)createCarTable;

#pragma mark ---------------------------操作表---------------------------

//插入数据
- (void)insertDataToTableName:(NSString *)sql Data:(NSArray *)dataArray;
//更新表
-(void)updateTable:(NSString *)sql ModelClass:(Class)modelClass;
//查询
- (NSArray *)queryFromTableName:(NSString *)TableName ModelClass:(Class)modelClass;
//删除表
- (BOOL)deleteTable:(NSString *)TableName;

#pragma mark ---------------------------查询表---------------------------

//获取收费站信息表
-(NSArray *)getStationTableData;

////获取高速干道信息表
//-(NSArray *)getHighWayRoadTable;

- (NSArray *) getNewAllHighWayRoadTable;

//得到设备列表信息表
-(NSArray *)getAllDeviceTable;

//获取更新时间表
-(NSArray *)getUpdateTimeTable;

//获取桩号信息表
-(NSArray *)getePirNoTable;

//获取两客一危数据
-(NSArray *)getCarTable;

#pragma mark ---------------------------更新表---------------------------

//更新收费站信息表
-(void)UpdateStationTable;

//更新高速干道信息表
-(void)UpdateHighWayRoadTable;

//更新设备列表信息表
-(void)UpdateDeviceTable;

//更新更新时间表
-(void)UpdateTimeTable;

//更新桩号信息表
-(void)UpdatePirInfoTable;

-(void)updateTable:(NSString *)sql;
//更新两客一危数据
-(void)UpdateCarTable;

-(NSArray *)getePirNoTableOfRow:(NSString *)row;

-(NSArray *)getePirUIDTableOfRow:(NSString *)UID;

-(NSArray *)getPirUIDTableofCameraPir:(NSString *)cameraPir;
@end
